
/**   
 * @Title: MenuServiceImpl.java 
 * @Package com.neusoft.neumooc.service 
 * @Description: TODO 
 * @author acer   
 * @date 2016年10月28日 上午8:22:20 
*/

package com.neusoft.neumooc.service;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.neusoft.core.common.exception.DAOException;
import com.neusoft.core.common.exception.ServiceException;
import com.neusoft.neumooc.VO.MenuVO;
import com.neusoft.neumooc.dao.MenusDao;
/** 
 * @ClassName: MenuServiceImpl 
 * @Description: TODO 
 * @author Fuyongjun
 * @date 2016年10月28日
 */
@Service
@Transactional
public class MenuServiceImpl implements MenuService{
	@Autowired MenusDao menuDao;
	/** 
	 * @Title: queryMenuCount 
	 * @Description: TODO 
	 * @return
	 * @throws ServiceException
	 */
	@Override
	public int queryMenuCount() throws ServiceException {
		return menuDao.queryMenuCount();
	}
	/** 
	 * @Title: getMenus 
	 * @Description: TODO 
	 * @param pageNo
	 * @param pageSize
	 * @return
	 * @throws ServiceException
	 */
	@Override
	public List<MenuVO> getMenus(int pageNo, int pageSize)
			throws ServiceException {
		return menuDao.getMenus(pageNo, pageSize);
	}
	/** 
	 * @Title: addMenu 
	 * @Description: TODO 
	 * @param menuvo
	 * @throws ServiceException
	 */
	@Override
	public void addMenu(MenuVO menuVo) throws ServiceException 
	{
	  menuDao.addMenu(menuVo);
	}
	/** 
	 * @Title: deleteBook 
	 * @Description: TODO 
	 * @param id
	 * @throws ServiceException
	 */
	@Override
	public int deleteMenu(String id) throws ServiceException {
	   return 	menuDao.deleteMenu(id);
	}
	
	/** 
	 * @Title: EditMenu 
	 * @Description: TODO 
	 * @param id
	 * @return
	 * @throws DAOException
	 */
	@Override
	public MenuVO menuInfo(String id) throws DAOException {
		return menuDao.menuInfo(id);
	}	
	/** 
	 * @Title: updateMenu 
	 * @Description: TODO 
	 * @param menuvo
	 * @throws ServiceException
	 */
	@Override
	public void updateMenu(MenuVO menuVO) throws ServiceException {
	    menuDao.updateMenu(menuVO);
	}
	/** 
	 * @Title: getMenuList 
	 * @Description: TODO 获得菜单列表
	 * @return
	 * @throws ServiceException
	 */
	@Override
	public List<MenuVO> getMenuList() throws ServiceException {
		return menuDao.getMenuList();
	}
	/** 
	 * @Title: checkRepeat 
	 * @Description: 判断插入是否同名吗
	 * @param name
	 * @return
	 * @throws ServiceException
	 */
	@Override
	public boolean checkRepeat(String  name) throws ServiceException {
	
		return menuDao.checkRepeat(name);
	}

}
